﻿using JoyAdmin.Core;
using Furion.DatabaseAccessor; 
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;

namespace JoyAdmin.EntityFramework.Core
{
    public class TenantSeedData : IEntitySeedData<SysTenant, MultiTenantDbContextLocator>
    {
        public IEnumerable<SysTenant> HasData(DbContext dbContext, Type dbContextLocator)
        {
            return new List<SysTenant>
            {
                 new SysTenant
                {
                    Id=1,
                    TenantId = Guid.Parse("6D29EF24-AF73-69E2-AD76-ADB95959CE45"),
                    Name = "系统管理",
                    AreaId=1,
                    Host = "localhost:9001",
                    CreatedTime = DateTimeOffset.Now,
                    StartServiceTime= DateTimeOffset.Now,
                },
                new SysTenant
                {
                    Id=2,
                    TenantId = Guid.Parse("916F73DB-70A9-7CFE-D721-93DEDCFD833D"),
                    Name = "测试租户1",
                    AreaId=1,
                    Host = "localhost:9002",
                    CreatedTime = DateTimeOffset.Now,
                    StartServiceTime= DateTimeOffset.Now
                },
                 
            };
        }
    }
}
